package com.ruoyi.sys.security.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sys.security.mapper.TbPatrollingPersonnelMapper;
import com.ruoyi.sys.security.domain.TbPatrollingPersonnel;
import com.ruoyi.sys.security.service.ITbPatrollingPersonnelService;

/**
 * 巡更人员Service业务层处理
 * 
 * @author iuxin
 * @date 2022-05-25
 */
@Service
public class TbPatrollingPersonnelServiceImpl implements ITbPatrollingPersonnelService 
{
    @Autowired
    private TbPatrollingPersonnelMapper tbPatrollingPersonnelMapper;

    /**
     * 查询巡更人员
     * 
     * @param ppId 巡更人员主键
     * @return 巡更人员
     */
    @Override
    public TbPatrollingPersonnel selectTbPatrollingPersonnelByPpId(Long ppId)
    {
        return tbPatrollingPersonnelMapper.selectTbPatrollingPersonnelByPpId(ppId);
    }

    /**
     * 查询巡更人员列表
     * 
     * @param tbPatrollingPersonnel 巡更人员
     * @return 巡更人员
     */
    @Override
    public List<TbPatrollingPersonnel> selectTbPatrollingPersonnelList(TbPatrollingPersonnel tbPatrollingPersonnel)
    {
        return tbPatrollingPersonnelMapper.selectTbPatrollingPersonnelList(tbPatrollingPersonnel);
    }

    /**
     * 新增巡更人员
     * 
     * @param tbPatrollingPersonnel 巡更人员
     * @return 结果
     */
    @Override
    public int insertTbPatrollingPersonnel(TbPatrollingPersonnel tbPatrollingPersonnel)
    {
        return tbPatrollingPersonnelMapper.insertTbPatrollingPersonnel(tbPatrollingPersonnel);
    }

    /**
     * 修改巡更人员
     * 
     * @param tbPatrollingPersonnel 巡更人员
     * @return 结果
     */
    @Override
    public int updateTbPatrollingPersonnel(TbPatrollingPersonnel tbPatrollingPersonnel)
    {
        return tbPatrollingPersonnelMapper.updateTbPatrollingPersonnel(tbPatrollingPersonnel);
    }

    /**
     * 批量删除巡更人员
     * 
     * @param ppIds 需要删除的巡更人员主键
     * @return 结果
     */
    @Override
    public int deleteTbPatrollingPersonnelByPpIds(Long[] ppIds)
    {
        return tbPatrollingPersonnelMapper.deleteTbPatrollingPersonnelByPpIds(ppIds);
    }

    /**
     * 删除巡更人员信息
     * 
     * @param ppId 巡更人员主键
     * @return 结果
     */
    @Override
    public int deleteTbPatrollingPersonnelByPpId(Long ppId)
    {
        return tbPatrollingPersonnelMapper.deleteTbPatrollingPersonnelByPpId(ppId);
    }
}
